#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int n;
	cin >> n;
	set<int> s;
	unordered_map<int, int> mp;
	for (int i = 1; i <= n; i++) {
		int x;
		cin >> x;
		if (s.count(x) == 0) {
			s.insert(x);
			mp[x] = i;
		} else {
			s.erase(x);
			mp.erase(x);
		}
	}
	if (s.empty())
		cout << "None";
	else
		cout << mp[*s.begin()] << " " << *s.begin();
	return 0;
}
